<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
	    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	    <title>充值二维码</title>
		<link rel="stylesheet" type="text/css" href="__CSS__/mui.min.css"/>
		<link rel="stylesheet" type="text/css" href="__CSS__/common.css"/>
		<link rel="stylesheet" type="text/css" href="__CSS__/index.css"/>
		<script src="__JS__/mui.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" charset="utf-8">
            mui.init();
		</script>
		<style type="text/css">
			input[type=text]{
				font-size:12px;
				width: 70%;
				height:33px;
			}
			.next_a{
				width: 200px;
				height: 40px;
				background: url(__IMG__/bg_inp.png)no-repeat;
				background-size:100% 100% ;
				color: #fff;
				line-height: 40px;
				text-align: center;
				margin-top: 50px;
			}
		</style>
	<body style="background: #fff;">
		<header class="mui-bar mui-bar-nav" style="background: #fff;">
	        <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: #000;"></a>
	        <h1 class="mui-title">支付宝充值</h1>
	    </header>
	    <div class="mui-content " style="background: #fff;" align="center">
			<div style="padding: 10px;">
				<p>请转到以下账号</p>
			</div>
			<div style="padding: 10px;">
				<p>
					<label for="">账号：</label>
					<input type="text" name="" id="k_card_number" value="{$data['k_card_number']}" readonly="readonly" />
					<button class="btn" data-clipboard-action="copy" data-clipboard-target="#k_card_number">复制</button>
				</p>
				<p>
					<label for="">姓名：</label>
					<input type="text" name="" id="k_name" value="{$data['k_name']}" readonly="readonly" />
					<button class="btn" data-clipboard-action="copy" data-clipboard-target="#k_name">复制</button>
				</p>
			</div>
			<div style="padding: 10px;">
				<p style="font-size: 20px">您的信息</p>
			</div>
			<div class="padding_10">
					<p>
						<label for="">支付宝账号</label>
						<input type="text"   name="name" id="pay_number"  value="" />
						<input type="hidden" name="way" id="way"    value="2" />
						<input type="hidden" name="remark" id="remark"  value="支付宝" />
					</p>
					<p>
						<label for="">支付宝姓名</label>
						<input type="text"   name="name" id="name"  value="{$username}" placeholder="请填写支付宝实名姓名"  />
					</p>
					<p>
						<label for="">充值金额：</label>
						<input type="text" name="money" id="money"  value="" placeholder="尽量后面带小数点，例如100.12" />
					</p>
			</div>
			<div >
				<p><a href="javascript:void(0)" class="next_a" id="tj">确认充值</a></p>
			</div>

	    </div>
	</body>
	<script src="__JSA__/jquery-1.10.2.min.js"></script>
	<script src="__JS__/layer.js" ></script>
	<script src="__JS__/rooms.js" ></script>
	<script src="__JS__/clipboard.min.js" ></script>
	<script>
		var clipboard = new Clipboard('.btn');
		clipboard.on('success', function(e) {
			my_error('复制成功')
		});

		clipboard.on('error', function(e) {
			my_error('复制失败')
		});
	</script>
	<script>
        $('#tj').click(function () {
            var name     = $('#name').val();
            var money    = $('#money').val();
            var remark   = $('#remark').val();
            var way      = $('#way').val();
            if(name==""){
                 my_error('请填写姓名');
                return false;
            }
            if(money==""){
                 my_error('请填写充值金额');
                return false;
            }
            $.ajax({
                type: "post",
                url: "{:url('recharge/offline_charge')}",
                data: {
                    "name": name,
                    'remark': remark,
                    'money': money,
                    'way':way
                },
                dataType: "json",
                async: false,
                success: function(data) {
                    var ret = data.ret;
                    var msg = data.msg;
                    if(ret=='200'){
                         my_error(msg);
                    }else{
                         my_error(msg);
                    }
                }
            });
        })

	</script>
</html>
